package com.polymorphic.objectpoly;

/**
 * @Author 小闽
 * @Date 2024/8/11 19:17
 * @PackageName: com.polymorphic.objectpoly
 * @ClassName: PolyObject
 * @Description: 对象多态
 * @Version 1.0
 */
public class PolyObject {
    /**
     * 体现对象多态特点
     */
    /**
     * animal编译类型是Animal,运行类型是Dog
     */
    public static void main(String[] args) {
        Animal animal = new Dog();
        animal.cry();
        animal = new Cat();
        animal.cry();
    }


}
